package com.yds.dubbo.basic.annotation;

import com.yds.dubbo.basic.annotation.config.ProviderConfiguration;
import com.yds.dubbo.common.EmbeddedZooKeeper;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.concurrent.CountDownLatch;

/**
 * @author liuhongzhen
 * @date 2023/3/23 17:59
 */
public class ProviderBootstrap {

    public static void main(String[] args) throws Exception {

        new EmbeddedZooKeeper(2181, false).start();

        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ProviderConfiguration.class);
        context.start();

        System.out.println("dubbo service started.");
        new CountDownLatch(1).await();
    }


}
